package com.guojiaming.interview;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.guojiaming.interview.first.FirstActivity;
import com.guojiaming.interview.second.SecondActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    TextView tvDemo01;
    TextView tvDemo02;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        tvDemo01 = findViewById(R.id.tv_demo_01);
        tvDemo02 = findViewById(R.id.tv_demo_02);
        tvDemo01.setOnClickListener(this);
        tvDemo02.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.tv_demo_01:
                FirstActivity.jumpTo(this);
                break;
            case R.id.tv_demo_02:
                SecondActivity.jumpTo(this);
                break;
            default:
        }
    }

}
